package com.ybkj.o2o.zhuanche.mapper;

import com.ybkj.o2o.zhuanche.common.query.CarTypeQuery;
import com.ybkj.o2o.zhuanche.entity.CarType;
import com.ybkj.o2o.zhuanche.entity.CarTypeCriteria;
import com.ybkj.o2o.zhuanche.entity.CarTypeRel;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface CarTypeMapper extends BaseMapper<CarType, CarTypeCriteria, Long> {
  Long countByExample(CarTypeCriteria example);

  int deleteByExample(CarTypeCriteria example);

  int deleteByPrimaryKey(Long id);

  int insert(CarType record);

  int insertSelective(CarType record);

  List<CarType> selectByExampleWithRowbounds(CarTypeCriteria example, RowBounds rowBounds);

  List<CarType> selectByExample(CarTypeCriteria example);

  CarType selectByPrimaryKey(Long id);

  int updateByExampleSelective(@Param("record") CarType record,
      @Param("example") CarTypeCriteria example);

  int updateByExample(@Param("record") CarType record, @Param("example") CarTypeCriteria example);

  int updateByPrimaryKeySelective(CarType record);

  int updateByPrimaryKey(CarType record);
  
  CarType findByCarTypeId(@Param("id") Long id, @Param("appKey") String appKey);
  
  List<CarType> selectByCompanyId(
      @Param("companyId") Long companyId, @Param("appKey") String appKey);
  
  int deleteById(@Param("id")Long id, @Param("appKey")String appKey);

  CarType findLikeName(CarTypeQuery carTypeQuery);

  List<CarType> findByParams(CarTypeQuery carTypeQuery);
  
  Long countByCompanyIdV4up(@Param("companyId")Long companyId,
      @Param("companyName")String companyName, @Param("appKey")String appKey);

  List<CarType> queryCarTypeV4up(CarTypeQuery carTypeQuery);
  
  Long countByParams(CarTypeQuery carTypeQuery);

  List<CarType> findByCarType(@Param("carType")String carType, @Param("appKey")String appKey);

  List<CarType> findByIds(@Param("ids") List<Long> ids);

  List<CarType> findByAreaId(@Param("areaId") Long areaId, @Param("appKey") String appKey);

int insertCarTypeRel(CarTypeRel carTypeRel);

List<CarTypeRel> getCarTypeRel(@Param("id")Long id,@Param("appKey") String appKey);

void deleteRel(@Param("id")Long id,@Param("appKey") String appKey);

CarType getCarTypeByTypeName(@Param("typeName")String typeName, @Param("appKey")String appKey);

List<CarType> getCarTypeByIftaxi(@Param("ifTaxi")String ifTaxi, @Param("appKey")String appKey);
}
